import java.io.DataInputStream;
import java.io.IOException;
import java.net.Socket;

public class Client {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //客户端连接服务器
        Socket socket = new Socket("127.0.0.1",61234);
        //ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());
        DataInputStream dataInputStream = new DataInputStream(socket.getInputStream());
        //等待命令
        while(true){
            //接受命令
            //Cmd cmd = (Cmd) objectInputStream.readObject();
            String cmd = dataInputStream.readUTF();
            //启动线程执行命令
            new Thread(){
                @Override
                public void run() {


                }
            }.start();
        }
        //接受到命令后启动线程，执行命令
    }
}
